/**
 * 窗口受理接口api
 * @author: chenyq
 * @date: 2021-01-25
 */
import request from "@/utils/request";

// 分页查询列表操作
export function page(query) {
  return request({
    url:
      process.env.VUE_APP_KSTB_ROUTE_PATH +
      "/infoManage/webstiteWindow/pageList",
    method: "get",
    params: query
  });
}
// 删除飘窗信息
export function deleteWebstiteWindowById(id) {
  return request({
    url:
      process.env.VUE_APP_KSTB_ROUTE_PATH +
      "/infoManage/webstiteWindow/deleteWebstiteWindowById?id=" +
      id,
    method: "post"
  });
}
// 启禁用飘窗信息
export function ableWebstiteWindowById(id) {
  return request({
    url:
      process.env.VUE_APP_KSTB_ROUTE_PATH +
      "/infoManage/webstiteWindow/ableWebstiteWindowById?id=" +
      id,
    method: "post"
  });
}
/**
 *
 * @param {*} data
 * 保存飘窗数据
 */
export function saveOrUpdate(data) {
  return request({
    url:
      process.env.VUE_APP_KSTB_ROUTE_PATH +
      "/infoManage/webstiteWindow/saveOrUpdate",
    method: "post",
    headers: {
      "Content-Type": "application/json;charset=UTF-8"
    },
    data: data
  });
}

// 查询飘窗操作
export function getWebstiteWindowById(id) {
  return request({
    url:
      process.env.VUE_APP_KSTB_ROUTE_PATH +
      "/infoManage/webstiteWindow/getWebstiteWindowById?id=" +
      id,
    method: "get"
  });
}
